home *** CD-ROM | disk | FTP | other *** search
/ Freelog 119 / FreelogNo119-MarsAvril2014.iso / Theme / Johns Background Switcher / SwitcherSetup48.exe / BackgroundSwitcher.chm / fixedheader.js < prev    next >
Encoding:
Text File  |  2013-12-15  |  1017 b   |  36 lines

  1. window.onload= resizeSplitWndw;
  2. window.onresize= resizeSplitWndw;
  3. window.onbeforeprint= set_to_print;
  4. window.onafterprint= reset_form;
  5.  
  6. function resizeSplitWndw()
  7. {
  8.     var onsr= document.all.item("nsr");
  9.     var omainbody= document.all.item("mainbody");
  10.  
  11.     document.all.mainbody.style.width= 0; //IE6 reload bug
  12.     if (omainbody ==null) return;
  13.     if (onsr != null)
  14.     {
  15.         document.all.mainbody.style.overflow= "auto";
  16.         document.all.nsr.style.width= document.body.offsetWidth-4;
  17.         document.all.mainbody.style.width= document.body.offsetWidth-4;
  18.         document.all.mainbody.style.top= document.all.nsr.offsetHeight;
  19.         if (document.body.offsetHeight > document.all.nsr.offsetHeight)
  20.             document.all.mainbody.style.height= document.body.offsetHeight - document.all.nsr.offsetHeight-4;
  21.         else 
  22.             document.all.mainbody.style.height=0;
  23.     }
  24. }
  25.  
  26. function set_to_print()
  27. {
  28.     var i;
  29.     if (window.mainbody)
  30.         document.all.mainbody.style.height = "auto";
  31. }
  32.  
  33. function reset_form()
  34. {
  35.     document.location.reload();
  36. }